﻿<common:LayoutAwarePage
    x:Name="pageRoot"
    x:Class="FoodandDining.ItemDetailPage"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:FoodandDining"
    xmlns:common="using:FoodandDining.Common"
    xmlns:data="using:FoodandDining.Data"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Page.TopAppBar>
        <AppBar x:Name="TopApp" Padding="10,0,10,0" MinHeight="110" Background="#FFFF5440" BorderBrush="#FFFF5440">
            <Grid Height="100" Margin="40,0">
                <StackPanel Margin="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
                    <Button x:Name="btnHome" Tag="Home" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Center" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Tapped="btnHome_Tapped"  >
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="91" Margin="0" Width="91" Background="#00464646">
                            <Image Source="Assets/Appbar/TopAppBarBtn1.png" Margin="0"/>
                        </Grid>
                    </Button>
                    <Button x:Name="btnCuisines" Tag="Cuisines" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Center" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Margin="10,0,0,0" Tapped="btnCuisines_Tapped"  >
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="91" Margin="0" Width="91" Background="#00464646">
                            <Image Source="Assets/Appbar/TopAppBarBtn2.png" Margin="0"/>
                        </Grid>
                    </Button>
                    <Button x:Name="btnTopRecipes" Tag="Top Recipes" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Center" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Margin="10,0,0,0" Tapped="btnTopRecipes_Tapped"  >
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="91" Margin="0" Width="91" Background="#00464646">
                            <Image Source="Assets/Appbar/TopAppBarBtn3.png" Margin="0"/>
                        </Grid>
                    </Button>
                    <Button x:Name="btnIngredients" Tag="Ingredients" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Center" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Margin="10,0,0,0" Tapped="btnIngredients_Tapped"  >
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="91" Margin="0" Width="91" Background="#00464646">
                            <Image Source="Assets/Appbar/TopAppBarBtn4.png" Margin="0"/>
                        </Grid>
                    </Button>
                    <Button x:Name="btnAddOns" Tag="Add-Ons" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Center" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Margin="10,0,0,0"  >
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="91" Margin="0" Width="91" Background="#00464646">
                            <Image Source="Assets/Appbar/TopAppBarBtn5.png" Margin="0"/>
                        </Grid>
                    </Button>
                </StackPanel>
            </Grid>
        </AppBar>
    </Page.TopAppBar>

    <Page.BottomAppBar>
        <AppBar x:Name="BottamApp" Padding="10,0,10,0" MinHeight="90" Background="#FFFF5440" BorderBrush="#FFFF5440">
            <Grid Margin="20,10,0,10">
                <Button x:Name="btnFlter" HorizontalAlignment="Left" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Stretch" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Click="btnFlter_Click">
                    <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="73" Margin="0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="75"/>
                        </Grid.RowDefinitions>
                        <Image HorizontalAlignment="Center" VerticalAlignment="Center" Source="Assets/Appbar/BotmAppbarBtn1.png" Margin="0" Height="73"/>
                    </Grid>
                </Button>
                <StackPanel Margin="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
                    <Button x:Name="btnComment" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal"  VerticalAlignment="Stretch" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Margin="10,0,0,0"  Click="btnComment_Click">
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="73" Margin="0">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="75"/>
                            </Grid.RowDefinitions>
                            <Image HorizontalAlignment="Center" VerticalAlignment="Center" Source="Assets/Appbar/BotmAppbarBtn2.png" Margin="0" Height="73"/>
                        </Grid>
                    </Button>
                    <Button x:Name="btnWriteaReview" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal"  VerticalAlignment="Stretch" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Margin="10,0,0,0">
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="73" Margin="0">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="75"/>
                            </Grid.RowDefinitions>
                            <Image HorizontalAlignment="Center" VerticalAlignment="Center" Source="Assets/Appbar/BotmAppbarBtn3.png" Margin="0" Height="73"/>
                        </Grid>
                    </Button>
                    <Button x:Name="btnBookmark" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal"  VerticalAlignment="Stretch" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Margin="10,0,0,0">
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="73" Margin="0">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="75"/>
                            </Grid.RowDefinitions>
                            <Image HorizontalAlignment="Center" VerticalAlignment="Center" Source="Assets/Appbar/BotmAppbarBtn4.png" Margin="0" Height="73"/>
                        </Grid>
                    </Button>

                </StackPanel>
            </Grid>
        </AppBar>
    </Page.BottomAppBar>

    <Page.Resources>

        <!--
            Collection of grouped items displayed by this page, bound to a subset
            of the complete item list because items in groups cannot be virtualized
        -->
        <CollectionViewSource
            x:Name="groupedItemsViewSource"
            Source="{Binding Groups}"
            IsSourceGrouped="true"
            ItemsPath="TopItems"
            d:Source="{Binding AllGroups, Source={d:DesignInstance Type=data:SimilarRecipesDataSource, IsDesignTimeCreatable=True}}"/>

        <Storyboard x:Name="CommentpopupOpen">
            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grdCommentPopup" d:IsOptimized="True"/>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="grdCommentPopup">
                <DiscreteObjectKeyFrame KeyTime="0">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:1.7">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="grdShadow">
                <DiscreteObjectKeyFrame KeyTime="0">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:0.5">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:1.7">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grdShadow">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.7" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="grdComment">
                <DiscreteObjectKeyFrame KeyTime="0">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:0.3">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:1">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:1.7">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="grdComment">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="1">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuinticEase/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:1.7" Value="1">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuinticEase/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="grdComment">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.01">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuinticEase/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:1.7" Value="1">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuinticEase/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grdComment">
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.7" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="CommentpopupClose">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grdCommentPopup">
                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="0:0:1.7" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.8" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.9" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="grdCommentPopup">
                <DiscreteObjectKeyFrame KeyTime="0">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:1.7">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:1.8">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Collapsed</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:1.9">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Collapsed</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="grdShadow">
                <DiscreteObjectKeyFrame KeyTime="0">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:1.2">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:1.7">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:1.8">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Collapsed</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grdShadow">
                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="0:0:1.2" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="0:0:1.7" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="grdComment">
                <DiscreteObjectKeyFrame KeyTime="0">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:0.7">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:1.4">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:1.7">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
                <DiscreteObjectKeyFrame KeyTime="0:0:1.8">
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Collapsed</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="grdComment">
                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="1">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuinticEase EasingMode="EaseIn"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:1.4" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuinticEase EasingMode="EaseIn"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <SplineDoubleKeyFrame KeyTime="0:0:1.7" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="grdComment">
                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="0.01">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuinticEase EasingMode="EaseIn"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:1.4" Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuinticEase EasingMode="EaseIn"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <SplineDoubleKeyFrame KeyTime="0:0:1.7" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grdComment">
                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="0:0:0.7" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="0:0:1.4" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="0:0:1.7" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>


    </Page.Resources>

    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <Grid Style="{StaticResource LayoutRootStyle}" x:Name="LayoutRoot" Background="#FFF1E5CC">
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!-- Horizontal scrolling grid used in most view states -->
        <ScrollViewer x:Name="scrollViewer" Grid.Row="1" Style="{StaticResource HorizontalScrollViewerStyle}" Margin="-20,-40,0,0">
        	<Grid>
        		<Grid.RowDefinitions>
        			<RowDefinition Height="60"/>
        			<RowDefinition Height="*"/>
        		</Grid.RowDefinitions>
        		<Grid.ColumnDefinitions>
        			<ColumnDefinition Width="120"/>
        			<ColumnDefinition Width="538"/>
        			<ColumnDefinition Width="80"/>
        			<ColumnDefinition Width="365"/>
        			<ColumnDefinition Width="80"/>
        			<ColumnDefinition Width="365"/>
        			<ColumnDefinition Width="80"/>
        			<ColumnDefinition Width="310"/>
        			<ColumnDefinition Width="40"/>
        			<ColumnDefinition Width="*"/>
					
        		</Grid.ColumnDefinitions>
        		<GridView
        			x:Name="itemGridView"
        			AutomationProperties.AutomationId="ItemGridView"
        			AutomationProperties.Name="Grouped Items"
        			Grid.RowSpan="2"
        			Padding="0,0,40,46"
        			ItemsSource="{Binding Source={StaticResource groupedItemsViewSource}}"
        			ItemTemplate="{StaticResource SimilarRecipesItemTemplate}"
        			SelectionMode="None"
        			IsSwipeEnabled="false"
        			IsItemClickEnabled="True"
        			ItemClick="ItemView_ItemClick" Margin="0,17,0,0" Grid.Column="9" ScrollViewer.HorizontalScrollBarVisibility="Disabled">

        			<GridView.ItemsPanel>
        				<ItemsPanelTemplate>
        					<VirtualizingStackPanel Orientation="Horizontal"/>
        				</ItemsPanelTemplate>
        			</GridView.ItemsPanel>
        			<GridView.GroupStyle>
        				<GroupStyle>
        					<GroupStyle.HeaderTemplate>
        						<DataTemplate>
        							<Grid Margin="1,0,0,6">
        								<Button
        									AutomationProperties.Name="Group Title"
        									Style="{StaticResource TextPrimaryButtonStyle}" >
        									<StackPanel Orientation="Horizontal">
        								<TextBlock Text="{Binding Title}" Margin="3,-7,10,10" Style="{StaticResource GroupHeaderTextStyle}" Foreground="Black" />
                                        
        									</StackPanel>
        								</Button>
        							</Grid>
        						</DataTemplate>
        					</GroupStyle.HeaderTemplate>
        					<GroupStyle.Panel>
        						<ItemsPanelTemplate>
        							<VariableSizedWrapGrid Orientation="Vertical" Margin="0,0,80,0"/>
        						</ItemsPanelTemplate>
        					</GroupStyle.Panel>
        				</GroupStyle>
        			</GridView.GroupStyle>
        		</GridView>
        		<Grid x:Name="grd1" Grid.Column="1" Grid.Row="1" Height="530" VerticalAlignment="Top">
        			<Grid.RowDefinitions>
        				<RowDefinition Height="440"/>
        				<RowDefinition Height="100"/>
        			</Grid.RowDefinitions>
        			<Grid Margin="0,0,0,-1">
        				<Image HorizontalAlignment="Left" VerticalAlignment="Top" Source="{Binding Image}" Stretch="UniformToFill"/>
        				<Grid x:Name="grdlevel" HorizontalAlignment="Right" Height="42" VerticalAlignment="Top" Width="185" Margin="0">
        					<Path Data="M-40.004,0.337302 L123.5,0.5 L123.5,41.5 L0.5,41.5 z" Fill="White" HorizontalAlignment="Right" Height="42.167" Stretch="Fill" VerticalAlignment="Top" Width="185" Margin="0,-0.167,0,0" UseLayoutRounding="False"/>
        					<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal" Margin="15,0,0,0">
        						<TextBlock TextWrapping="Wrap" Text="Level" Foreground="#FFFF2246" VerticalAlignment="Center" FontFamily="Segoe UI" FontSize="18.667"/>
        						<Rectangle Fill="#FFFF2246" Height="22" Width="1.5" Margin="5,0,0,0"/>
        						<TextBlock TextWrapping="Wrap" Text="{Binding Level}" Foreground="#FFFF2246" VerticalAlignment="Center" FontFamily="Segoe UI" FontSize="18.667" Margin="5,0,0,0" FontWeight="Bold"/>
        					</StackPanel>
        				</Grid>
        			</Grid>
        			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Description}" VerticalAlignment="Top" Grid.Row="1" Margin="0,10,0,5" Foreground="#FF191919" FontFamily="Segoe UI" FontSize="16"/>
        		</Grid>
        		<TextBlock x:Name="txtheader1" Margin="0,0,0,10" Style="{StaticResource GroupHeaderTextStyle}" Foreground="Black" VerticalAlignment="Center" Grid.Column="3" Text="Ingredients" />
        		<TextBlock x:Name="txtheader2" Margin="0,0,0,10" Style="{StaticResource GroupHeaderTextStyle}" Foreground="Black" VerticalAlignment="Center" Grid.Column="5" Text="Method" />
        		<TextBlock x:Name="txtheader3" Margin="0,0,0,10" Style="{StaticResource GroupHeaderTextStyle}" Foreground="Black" VerticalAlignment="Center" Grid.Column="7" Text="Reviews" />
        		<Grid x:Name="grd2" Grid.Column="3" Grid.Row="1" Background="White" Height="530" VerticalAlignment="Top">
        			<StackPanel Margin="20,30,10,10" Orientation="Vertical">
        				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="For Curry" VerticalAlignment="Top" Foreground="#FF191919" FontSize="16" FontFamily="Segoe UI" FontWeight="Bold" Margin="0,0,0,5"/>
        				<Grid x:Name="Line1" VerticalAlignment="Top">
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="6"/>
        						<ColumnDefinition Width="*"/>
        					</Grid.ColumnDefinitions>
        					<Ellipse Height="6" Width="6" VerticalAlignment="Top" HorizontalAlignment="Left" Fill="#FF191919" Margin="0,4,0,0"/>
                            <TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor" VerticalAlignment="Top" Foreground="#FF191919" FontSize="16" FontFamily="Segoe UI" Grid.Column="1" Margin="3,0,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16"/>
        				</Grid>
        				<Grid x:Name="Line2" VerticalAlignment="Top" Margin="0,2,0,0">
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="6"/>
        						<ColumnDefinition Width="*"/>
        					</Grid.ColumnDefinitions>
        					<Ellipse Height="6" Width="6" VerticalAlignment="Top" HorizontalAlignment="Left" Fill="#FF191919" Margin="0,4,0,0"/>
                            <TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor" VerticalAlignment="Top" Foreground="#FF191919" FontSize="16" FontFamily="Segoe UI" Grid.Column="1" Margin="3,0,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16"/>
        				</Grid>
        				<Grid x:Name="Line3" VerticalAlignment="Top" Margin="0,2,0,0">
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="6"/>
        						<ColumnDefinition Width="*"/>
        					</Grid.ColumnDefinitions>
        					<Ellipse Height="6" Width="6" VerticalAlignment="Top" HorizontalAlignment="Left" Fill="#FF191919" Margin="0,4,0,0"/>
                            <TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor" VerticalAlignment="Top" Foreground="#FF191919" FontSize="16" FontFamily="Segoe UI" Grid.Column="1" Margin="3,0,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16"/>
        				</Grid>
        				<Grid x:Name="Line4" VerticalAlignment="Top" Margin="0,2,0,0">
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="6"/>
        						<ColumnDefinition Width="*"/>
        					</Grid.ColumnDefinitions>
        					<Ellipse Height="6" Width="6" VerticalAlignment="Top" HorizontalAlignment="Left" Fill="#FF191919" Margin="0,4,0,0"/>
                            <TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor,2" VerticalAlignment="Top" Foreground="#FF191919" FontSize="16" FontFamily="Segoe UI" Grid.Column="1" Margin="3,0,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16"/>
        				</Grid>
        				<Grid x:Name="Line5" VerticalAlignment="Top" Margin="0,2,0,0">
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="6"/>
        						<ColumnDefinition Width="*"/>
        					</Grid.ColumnDefinitions>
        					<Ellipse Height="6" Width="6" VerticalAlignment="Top" HorizontalAlignment="Left" Fill="#FF191919" Margin="0,4,0,0"/>
                            <TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor" VerticalAlignment="Top" Foreground="#FF191919" FontSize="16" FontFamily="Segoe UI" Grid.Column="1" Margin="3,0,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16"/>
        				</Grid>
        				<Grid x:Name="Line6" VerticalAlignment="Top" Margin="0,2,0,0">
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="6"/>
        						<ColumnDefinition Width="*"/>
        					</Grid.ColumnDefinitions>
        					<Ellipse Height="6" Width="6" VerticalAlignment="Top" HorizontalAlignment="Left" Fill="#FF191919" Margin="0,4,0,0"/>
                            <TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor" VerticalAlignment="Top" Foreground="#FF191919" FontSize="16" FontFamily="Segoe UI" Grid.Column="1" Margin="3,0,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16"/>
        				</Grid>
        				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="For paste " VerticalAlignment="Top" FontSize="16" FontFamily="Segoe UI" FontWeight="Bold" Margin="0,20,0,5" Foreground="#FF191919"/>
        				<Grid x:Name="Line7" VerticalAlignment="Top">
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="6"/>
        						<ColumnDefinition Width="*"/>
        					</Grid.ColumnDefinitions>
        					<Ellipse Height="6" Width="6" VerticalAlignment="Top" HorizontalAlignment="Left" Fill="#FF191919" Margin="0,4,0,0"/>
                            <TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor" VerticalAlignment="Top" Foreground="#FF191919" FontSize="16" FontFamily="Segoe UI" Grid.Column="1" Margin="3,0,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16"/>
        				</Grid>
        				<Grid x:Name="Line8" VerticalAlignment="Top" Margin="0,2,0,0">
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="6"/>
        						<ColumnDefinition Width="*"/>
        					</Grid.ColumnDefinitions>
        					<Ellipse Height="6" Width="6" VerticalAlignment="Top" HorizontalAlignment="Left" Fill="#FF191919" Margin="0,4,0,0"/>
                            <TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor" VerticalAlignment="Top" Foreground="#FF191919" FontSize="16" FontFamily="Segoe UI" Grid.Column="1" Margin="3,0,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16"/>
        				</Grid>
        				<Grid x:Name="Line9" VerticalAlignment="Top" Margin="0,2,0,0">
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="6"/>
        						<ColumnDefinition Width="*"/>
        					</Grid.ColumnDefinitions>
        					<Ellipse Height="6" Width="6" VerticalAlignment="Top" HorizontalAlignment="Left" Fill="#FF191919" Margin="0,4,0,0"/>
                            <TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor, 6" VerticalAlignment="Top" Foreground="#FF191919" FontSize="16" FontFamily="Segoe UI" Grid.Column="1" Margin="3,0,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16"/>
        				</Grid>
        				<Grid x:Name="Line10" VerticalAlignment="Top" Margin="0,2,0,0">
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="6"/>
        						<ColumnDefinition Width="*"/>
        					</Grid.ColumnDefinitions>
        					<Ellipse Height="6" Width="6" VerticalAlignment="Top" HorizontalAlignment="Left" Fill="#FF191919" Margin="0,4,0,0"/>
                            <TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor, 1/2 cup" VerticalAlignment="Top" Foreground="#FF191919" FontSize="16" FontFamily="Segoe UI" Grid.Column="1" Margin="3,0,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16"/>
        				</Grid>
        				<Grid x:Name="Line11" VerticalAlignment="Top" Margin="0,2,0,0">
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="6"/>
        						<ColumnDefinition Width="*"/>
        					</Grid.ColumnDefinitions>
        					<Ellipse Height="6" Width="6" VerticalAlignment="Top" HorizontalAlignment="Left" Fill="#FF191919" Margin="0,4,0,0"/>
                            <TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor, 2 inch piece" VerticalAlignment="Top" Foreground="#FF191919" FontSize="16" FontFamily="Segoe UI" Grid.Column="1" Margin="3,0,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16"/>
        				</Grid>
        				<Grid x:Name="Line12" VerticalAlignment="Top" Margin="0,2,0,0">
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="6"/>
        						<ColumnDefinition Width="*"/>
        					</Grid.ColumnDefinitions>
        					<Ellipse Height="6" Width="6" VerticalAlignment="Top" HorizontalAlignment="Left" Fill="#FF191919" Margin="0,4,0,0"/>
                            <TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor" VerticalAlignment="Top" Foreground="#FF191919" FontSize="16" FontFamily="Segoe UI" Grid.Column="1" Margin="3,0,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16"/>
        				</Grid>
        				<Grid x:Name="Line13" VerticalAlignment="Top" Margin="0,2,0,0">
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="6"/>
        						<ColumnDefinition Width="*"/>
        					</Grid.ColumnDefinitions>
        					<Ellipse Height="6" Width="6" VerticalAlignment="Top" HorizontalAlignment="Left" Fill="#FF191919" Margin="0,4,0,0"/>
                            <TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor" VerticalAlignment="Top" Foreground="#FF191919" FontSize="16" FontFamily="Segoe UI" Grid.Column="1" Margin="3,0,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16"/>
        				</Grid>
        			</StackPanel>
        		</Grid>
        		<Grid x:Name="grd3" Grid.Column="5" Grid.Row="1" Background="White" Height="530" VerticalAlignment="Top">
                    <TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi suscipit scelerisque quam a cursus. Aenean cursus convallis Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi suscipit scelerisque quam a cursus. Aenean cursus convallis Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi suscipit scelerisque quam a cursus. Aenean cursus convallis Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi suscipit scelerisque quam a cursus. Aenean cursus convallis Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi suscipit scelerisque quam a cursus. Aenean cursus convallis Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi suscipit scelerisque quam a cursus. Aenean cursus convallis Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi suscipit scelerisque quam a cursus. Aenean cursus convallis Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi suscipit scelerisque quam a cursus. Aenean cursus convallis " VerticalAlignment="Top" Foreground="#FF191919" FontSize="16" FontFamily="Segoe UI" Margin="20,30,10,10" LineHeight="16"/>
        		</Grid>
        		<Grid x:Name="grd4" Height="530" VerticalAlignment="Top" Background="#00CF7F7F" Grid.Column="7" Grid.Row="1">
        			<ListView SelectionMode="None" ScrollViewer.VerticalScrollBarVisibility="Disabled">
        				<StackPanel x:Name="spItem1" Width="300" Background="#FFF1E5CC">
        					<TextBlock TextWrapping="Wrap" Text="Lorem Ipsum Says:" Foreground="#FF191919" FontSize="13.333" FontWeight="Light"/>
        					<TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi suscipit scelerisque quam a cursus. Aenean cursus convallis " Foreground="#A5191919" FontSize="13.333" FontWeight="Light" Margin="0,3,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16"/>
        					<Rectangle Fill="#FF898989" Height="1" StrokeThickness="0" Margin="0,5"/>
        				</StackPanel>
        				<StackPanel x:Name="spItem2" Width="300" Background="#FFF1E5CC" Margin="0">
        					<TextBlock TextWrapping="Wrap" Text="Lorem Ipsum Says:" FontSize="13.333" FontWeight="Light" Foreground="#FF191919"/>
        					<TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi suscipit scelerisque quam a cursus. Aenean cursus convallis " FontSize="13.333" FontWeight="Light" Margin="0,3,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16" Foreground="#A5191919"/>
        					<Rectangle Height="1" StrokeThickness="0" Margin="0,5,0,2" Fill="#FF898989"/>
        				</StackPanel>
        				<StackPanel x:Name="spItem3" Width="300" Background="#FFF1E5CC" Margin="0">
        					<TextBlock TextWrapping="Wrap" Text="Lorem Ipsum Says:" FontSize="13.333" FontWeight="Light" Foreground="#FF191919"/>
        					<TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi suscipit scelerisque quam a cursus. Aenean cursus convallis " FontSize="13.333" FontWeight="Light" Margin="0,3,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16" Foreground="#A5191919"/>
        					<Rectangle Height="1" StrokeThickness="0" Margin="0,5" Fill="#FF898989"/>
        				</StackPanel>
        				<StackPanel x:Name="spItem4" Width="300" Background="#FFF1E5CC" Margin="0">
        					<TextBlock TextWrapping="Wrap" Text="Lorem Ipsum Says:" FontSize="13.333" FontWeight="Light" Foreground="#FF191919"/>
        					<TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi suscipit scelerisque quam a cursus. Aenean cursus convallis " FontSize="13.333" FontWeight="Light" Margin="0,3,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16" Foreground="#A5191919"/>
        					<Rectangle Height="1" StrokeThickness="0" Margin="0,5" Fill="#FF898989"/>
        				</StackPanel>
        				<StackPanel x:Name="spItem5" Width="300" Background="#FFF1E5CC" Margin="0">
        					<TextBlock TextWrapping="Wrap" Text="Lorem Ipsum Says:" FontSize="13.333" FontWeight="Light" Foreground="#FF191919"/>
        					<TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi suscipit scelerisque quam a cursus. Aenean cursus convallis " FontSize="13.333" FontWeight="Light" Margin="0,3,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16" Foreground="#A5191919"/>
        					<Rectangle Height="1" StrokeThickness="0" Margin="0,5" Fill="#FF898989"/>
        				</StackPanel>
        				<StackPanel x:Name="spItem6" Width="300" Background="#FFF1E5CC" Margin="0">
        					<TextBlock TextWrapping="Wrap" Text="Lorem Ipsum Says:" FontSize="13.333" FontWeight="Light" Foreground="#FF191919"/>
        					<TextBlock TextWrapping="Wrap" Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi suscipit scelerisque quam a cursus. Aenean cursus convallis " FontSize="13.333" FontWeight="Light" Margin="0,3,0,0" LineStackingStrategy="BlockLineHeight" LineHeight="16" Foreground="#A5191919"/>
        					<Rectangle Height="1" StrokeThickness="0" Margin="0,5,0,0" Fill="#FF898989"/>
        				</StackPanel>
        			</ListView>
        		</Grid>
        	</Grid>
        </ScrollViewer>

        <!-- Horizontal scrolling grid used in most view states -->

        <!-- Vertical scrolling list only used when snapped -->
        <ListView
            x:Name="itemListView"
            AutomationProperties.AutomationId="ItemListView"
            AutomationProperties.Name="Grouped Items"
            Grid.Row="1"
            Visibility="Collapsed"
            Margin="0,-10,0,0"
            Padding="10,0,0,60"
            ItemsSource="{Binding Source={StaticResource groupedItemsViewSource}}"
            ItemTemplate="{StaticResource Standard80ItemTemplate}"
            SelectionMode="None"
            IsSwipeEnabled="false"
            IsItemClickEnabled="True"
            ItemClick="ItemView_ItemClick">

            <ListView.GroupStyle>
                <GroupStyle>
                    <GroupStyle.HeaderTemplate>
                        <DataTemplate>
                            <Grid Margin="7,7,0,0">
                                <Button
                                    AutomationProperties.Name="Group Title"
                                    Click="Header_Click"
                                    Style="{StaticResource TextPrimaryButtonStyle}">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="{Binding Title}" Margin="3,-7,10,10" Style="{StaticResource GroupHeaderTextStyle}" />
                                        <TextBlock Text="{StaticResource ChevronGlyph}" FontFamily="Segoe UI Symbol" Margin="0,-7,0,10" Style="{StaticResource GroupHeaderTextStyle}"/>
                                    </StackPanel>
                                </Button>
                            </Grid>
                        </DataTemplate>
                    </GroupStyle.HeaderTemplate>
                </GroupStyle>
            </ListView.GroupStyle>
        </ListView>

        <!-- Back button and page title -->
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="backButton" Click="GoBack" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}"/>
            <TextBlock x:Name="pageTitle"  Text="{Binding Title}" Grid.Column="1" IsHitTestVisible="false" Style="{StaticResource PageHeaderTextStyle}" Foreground="#DE000000" Margin="0,0,300,40" FontSize="48"/>
            <Image x:Name="image" HorizontalAlignment="Right" VerticalAlignment="Center" Width="212" Source="Assets/HubPage/Logo.png" Margin="0,20,40,20" Grid.Column="1"/>
        </Grid>
        <TextBlock x:Name="txtSnapedView" HorizontalAlignment="Center" TextWrapping="Wrap" Text="Please switch to full screen to view the details." VerticalAlignment="Center" FontFamily="Segoe UI" FontSize="21.333" Grid.RowSpan="2" Margin="10,0" Foreground="#FFFF2246" Visibility="Collapsed"/>
        <Grid x:Name="grdCommentPopup" Margin="0" Grid.RowSpan="2" Opacity="0" Visibility="Collapsed">
        	<Grid x:Name="grdShadow" Opacity="0" Visibility="Collapsed" Tapped="grdShadow_Tapped" Background="#CC000000"/>

        	<Grid x:Name="grdComment" HorizontalAlignment="Center" Height="300" VerticalAlignment="Center" Width="525" Background="#FFFF5440" Visibility="Collapsed" Opacity="0" RenderTransformOrigin="0.5,0.5">
        		<Grid.RenderTransform>
        			<CompositeTransform/>
        		</Grid.RenderTransform>
        		<Grid HorizontalAlignment="Center" Height="190" VerticalAlignment="Center" Width="440">
        			<Grid.RowDefinitions>
        				<RowDefinition Height="*"/>
        				<RowDefinition Height="7"/>
        				<RowDefinition Height="148"/>
        			</Grid.RowDefinitions>
        			<TextBox TextWrapping="Wrap" Grid.Row="2" Background="#FFF69679" BorderBrush="#FFF69679"/>
        			<StackPanel VerticalAlignment="Top" Orientation="Horizontal">
        				<Image Height="34" HorizontalAlignment="Left" Source="Assets/CommentIcon.png"/>
        				<TextBlock TextWrapping="Wrap" Text="Comment" Foreground="Black" FontSize="24" FontFamily="Segoe UI" FontWeight="Light" VerticalAlignment="Bottom" Margin="5,0,0,-6"/>
        			</StackPanel>
        		</Grid>
        	</Grid>

        </Grid>

        <VisualStateManager.VisualStateGroups>

            <!-- Visual states reflect the application's view state -->
            <VisualStateGroup x:Name="ApplicationViewStates">
                <VisualState x:Name="FullScreenLandscape"/>
                <VisualState x:Name="Filled"/>

                <!-- The entire page respects the narrower 100-pixel margin convention for portrait -->
                <VisualState x:Name="FullScreenPortrait">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PortraitBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>

                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="itemGridView" Storyboard.TargetProperty="Padding">
                            <DiscreteObjectKeyFrame KeyTime="0">
                            	<DiscreteObjectKeyFrame.Value>
                            		<Thickness>0,0,40,56</Thickness>
                            	</DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="scrollViewer">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Thickness>-20,-40,0,0</Thickness>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>

                <!--
                    The back button and title have different styles when snapped, and the list representation is substituted
                    for the grid displayed in all other view states
                -->
                <VisualState x:Name="Snapped">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedPageHeaderTextStyle}"/>
                        </ObjectAnimationUsingKeyFrames>

                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="itemListView" Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0">
                            	<DiscreteObjectKeyFrame.Value>
                            		<Visibility>Collapsed</Visibility>
                            	</DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="itemGridView" Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="scrollViewer">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Collapsed</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Collapsed</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="pageTitle">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Thickness>0,0,10,40</Thickness>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="txtSnapedView">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Visible</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="TopApp">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Collapsed</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="BottamApp">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Collapsed</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <DoubleAnimation Duration="0" To="33.333" Storyboard.TargetProperty="(TextBlock.FontSize)" Storyboard.TargetName="pageTitle" d:IsOptimized="True"/>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Grid>
</common:LayoutAwarePage>
